import React, { Component } from 'react';
class Demo extends Component{
    touchPass=(params) => {
        this.props.handPclick("🐢")
    }
    render(){
        return(
            <div>{this.props.msg}
            <button onClick={this.touchPass}>点击进行传值</button>
            </div>
        )
    }
}
class tesing extends Component {
    state={
        childmsg:"",
        msg:"🚀"
    }
    handClick=(params) => {
        console.log("1111111")
        this.setState({
            childmsg:params
        })
        
    }
    render() {
        return (
            <div>
                <h1>子组件传过来的信息{this.state.childmsg}</h1>
               <Demo msg={this.state.msg} handPclick={this.handClick}></Demo> 
            </div>
        );
    }
}

export default tesing;